<?php
class network_code extends Model{
	public static function getTableName(){
		return 'network_code';
	}

	public function findByInSql($instr)
	{
		if (is_null($instr)) $instr = '';
		$sql = "select * from ".self::getTableName()." where id in (".$instr.")";
		return Model::$dbo['r']->findBySql(__class__, $sql);
	}

	public function getCodeByLang($lang_id)
	{
		$sql = "select * from ".self::getTableName()." a left join `network_code-language` b on a.code=b.network_code where b.language_id={$lang_id}";
		return Model::$dbo['r']->findBySql(__class__, $sql);
	}
}
?>
